package com.cmbc.thread;

import java.util.concurrent.FutureTask;

/**
 * 创建多线程的方式3.实现Callble接口
 * @author MilchstraBe_
 *
 */
public class App3 {

	public static void main(String[] args) {
		FutureTask<String> futureTask=new FutureTask(new Window3());
		Thread thread1=new Thread(futureTask);
		thread1.setName("窗口1");
		FutureTask<String> futureTask2=new FutureTask(new Window3());
		Thread thread2=new Thread(futureTask2);
		thread2.setName("窗口2");
		thread1.start();
		thread2.start();
	}

}
